package com.qzd.builder.chain;

/**
 * 建造者模式
 * 需要一个构建者才创建对象
 */
public class CourseBuild {
    private Course course=new Course();

    public CourseBuild addName(String name){
        course.setName(name);
        return this;
    }
    public CourseBuild addppt(String ppt){
        course.setPpt(ppt);
        return this;
    }
    public CourseBuild addVideo(String Video){
        course.setVideo(Video);
        return this;
    }
    public Course build(){
        return  course;
    }
}
